<template>
	<view class="policyBox">
		<template v-if="intro && (intro.content || intro.title)">
			<view class="title">{{intro.title}} 机具开机政策</view>
			<view class="content" v-html="intro.content"></view>
		</template>
		<empty v-if="intro && !intro.content && !intro.title"/>
	</view>
</template>

<script>
	import {getIntro} from '@/api/index.js'
	import empty from "@/components/empty/empty.vue"
	export default {
		components:{
			empty
		},
		data() {
			return {
				type:'',
				intro:''
			}
		},
		onLoad(options){
			if(options && options.type){
				this.type = options.type
				console.log('options:',options)
			}
			this.getDetails()
		},
		methods: {
			async getDetails(){
				const res = await getIntro({type:this.type})
				
				this.intro = res || {}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.policyBox{
		padding: 30rpx;
		.title{
			text-align: center;
			font-size: 30rpx;
			padding: 0 0 30rpx 0;
			font-weight: bold;
		}
		.content{
			font-size: 26rpx !important;
			line-height: 44rpx !important;
		}
	}
</style>
